fo=open("D:\\hello.txt","w")
str=input("请输入一段文字：")
fo.write(str)
fo.close()